<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .tutu-enter{
        opacity: 0;
    }
    .tutu-enter-active{
        transform: translateY(50px);
        transition: all 5s;
    }
    .tutu-enter-to{
        opacity: 1;
    }
    .tutu-leave{
        opacity: 1;
    }
    .tutu-leave-active{
        transition: all 5s;
    }
    .tutu-leave-to{
        opacity: 0;
    }
</style>
<body>
    <div id="app">
        <button @click="flag=!flag">显示隐藏</button>
        <!-- 当transition这个模板上没有name时，默认为v  当有name时该name的值为这六个类名的前缀 -->
        <transition name="tutu">
            <p v-show="flag">{{msg}}</p>
        </transition>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{
                msg:'明天周五了！！',
                flag:true
            }
        })
    </script>
</body>
</html>